<template>
  <el-card class="my-pannel">
    <template #header>
      <el-row class="card-header title-text">
        <el-col :span="24"
          ><span>{{ headerTitle }}</span></el-col
        >
      </el-row>
    </template>
    <el-row>
      <slot></slot>
    </el-row>
    <template #footer>
      <el-row class="card-footer footer-text" style="justify-content: flex-end">
        <el-col :span="24"
          ><span>{{ footerText }}</span></el-col
        >
      </el-row>
    </template>
  </el-card>
</template>

<script>
export default {
  props: {
    headerTitle: String,
    footerText: String,
  },
  data() {
    return {};
  },
};
</script>

<style lang="scss" scoped>
.my-pannel {
  background-color: $pannel-color;
  border-radius: 10px;
  padding: 10px;
  /* 初始颜色透明度为 0.5 */
  transition: background-color 0.3s ease;
  :deep(.el-card__header) {
    padding: 0 5px 10px 5px;
    .card-header {
      .el-col {
        line-height: 1.5;
      }
    }
  }
  :deep(.el-card__footer) {
    padding: 5px 5px;
    .card-footer {
      .el-col {
        line-height: 1;
        text-align: right;
      }
    }
  }
  :deep(.el-card__body) {
    padding: 8px;
  }
}
</style>
